package com.huluobo.day11_im.bean;

import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.hyphenate.chat.EMMessage;
import com.hyphenate.chat.adapter.message.EMAMessage;

public class MyEMMessage extends EMMessage implements MultiItemEntity {
    public static final int ITEM_TYPE_SEND_MESSAGE = 0;
    public static final int ITEM_TYPE_RECEIVE_MESSAGE = 1;

    public MyEMMessage(EMAMessage message) {
        super(message);
    }

    @Override
    public int getItemType() {
        if (direct() == Direct.SEND) {
            return ITEM_TYPE_SEND_MESSAGE;
        } else {
            return ITEM_TYPE_RECEIVE_MESSAGE;
        }
    }
}
